<div class="pageContent">
    <form action="__URL__/update/navTabId/{:CONTROLLER_NAME}" id="j_nav_form" class="pageForm form-validate" method="post" callback="dialogAjaxDone" noEnter>
      <input type="hidden" name="id" value="{$vo.id}" />
        <div class="pageFormContent form-horizontal" layouth="60">
           <div class="form-group">
                <label for="j_type" class="control-label col-sm-2">类型：</label>
               <select name="type"  data-container="body"  id="j_type" class="selectpicker show-tick" data-style="btn-default btn-sm" data-width="auto">
                                <option <eq name="vo.type" value="0" >selected</eq> value="0">分类</option>
                                <option <eq name="vo.type" value="1" >selected</eq> value="1">分组</option>
                                 <option <eq name="vo.type" value="2" >selected</eq> value="2">控制器</option>
                                <option <eq name="vo.type" value="3" >selected</eq> value="3">自定义</option>
                 </select>
            </div>
           
            
           
            <div class="form-group" id="fenlei">
                <label for="j_cid" class="control-label col-sm-2">分类：</label>
                <select name="cid" id="j_cid" data-container="body"  class="selectpicker show-tick" data-style="btn-default btn-sm" data-width="auto">
                               
                               <volist name="catelist" id="fenlei">
                                 <option <eq name="vo.cid" value="fenlei.id" >selected</eq> value="{$fenlei.id}">{$fenlei.name}</option>
                               </volist>
                 </select>
            </div>
            <div class="form-group hidden" id="fenzu">
                <label for="j_gid" class="control-label col-sm-2">分组：</label>
                <select name="gid"  id="j_gid" data-container="body"  class="selectpicker show-tick" data-style="btn-default btn-sm" data-width="auto">
                               <volist name="group" id="fenzu">
                                 <option  <eq name="vo.fid" value="key" >selected</eq> value="{$key}">{$fenzu}</option>
                               </volist>
                 </select>
            </div>
             <div class="form-group hidden" id="navname">
                <label for="j_name" class="control-label col-sm-2">名称：</label>
                <input type="text" class="form-control validate[required] required" size="20" name="name" id="j_name" value="{$vo.name}"  >
            </div>
            
          
            <div class="form-group kongzhiqi hidden">
                <label for="j_controll" class="control-label col-sm-2">控制器：</label>
                <input type="text" class="form-control  validate[required,custom[onlyLetterNumber]] required" size="10" name="controll" id="j_controll" value="{$vo.controll}" >
             </div>
            <div class="form-group kongzhiqi hidden">
                <label for="j_action" class="control-label col-sm-2">操作名：</label>
                <input type="text" class="form-control  validate[required,custom[onlyLetterNumber]] required" size="10" name="action" id="j_action" value="{$vo.action}" >
            </div>
             <div class="form-group hidden" id="zidingyi">
                <label for="j_url" class="control-label col-sm-2">链接：</label>
                <input type="text" class="form-control  validate[required] required" size="30" name="url" id="j_url" value="{$vo.url}" >
            </div>
            <script type="text/javascript">
            
            $(function(){
            	
            	$nowtype = $('#j_type').find("option:selected").attr("value");
            	if($nowtype==0){
	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').removeClass('hidden');
	                   $('#navname').addClass('hidden');
         		}
                 if($nowtype==1){
	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').removeClass('hidden');
	                   $('#navname').addClass('hidden');   
	                   $('#fenlei').addClass('hidden');          			
         		}
                 if($nowtype==2){
	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').removeClass('hidden');
	                   $('#navname').removeClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').addClass('hidden');	
                 }
                 if($nowtype==3){
	                   $('#zidingyi').removeClass('hidden');
	                   $('#navname').removeClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').addClass('hidden');
                 }
            	
            	
            	$('#j_type').change(function(){
            		
            		var $type = $(this).find("option:selected").attr("value");
            		if($type==0){
 	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').removeClass('hidden');
	                   $('#navname').addClass('hidden');
            		}
                    if($type==1){
 	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').removeClass('hidden');
	                   $('#navname').addClass('hidden');   
	                   $('#fenlei').addClass('hidden');          			
            		}
                    if($type==2){
 	                   $('#zidingyi').addClass('hidden');
	                   $('.kongzhiqi').removeClass('hidden');
	                   $('#navname').removeClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').addClass('hidden');	
                    }
                    if($type==3){
	                   $('#zidingyi').removeClass('hidden');
	                   $('#navname').removeClass('hidden');
	                   $('.kongzhiqi').addClass('hidden');
	                   $('#fenzu').addClass('hidden');
	                   $('#fenlei').addClass('hidden');
                    }
            	});
            	
            	
            });
            
            
            
            </script>
              <div class="form-group">
                <label for="j_sort" class="control-label col-sm-2">排序：</label>
                <input type="text" class="form-control validate[required,custom[integer]] required" size="5" name="sort" id="j_sort" value="{$vo.sort}" >
            </div>
                        <div class="form-group">
                <label for="j_win" class="control-label col-sm-2">新窗口：</label>
               <select name="win"  data-container="body"  id="j_win" class="selectpicker show-tick validate[required]" data-style="btn-default btn-sm" data-width="auto">
                               
                                 <option <eq name="vo.win" value="1" >selected</eq> value="1">是</option>
                                <option <eq name="vo.win" value="0" >selected</eq> value="0">否</option>
                 </select>
            </div>
            <div class="form-group">
                <label for="j_status" class="control-label col-sm-2">状态：</label>
               <select name="status"  data-container="body"  id="j_status" class="selectpicker show-tick validate[required]" data-style="btn-default btn-sm" data-width="auto">
                               
                                 <option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
                                <option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
                 </select>
            </div>
            
		</div>
		<div class="formBar">
            <ul>
                <li><button type="submit" class="btn btn-default btn-sm">保存</button></li>
                <li><button type="button" url="__URL__" class="btn btn-close btn-sm ">取消</button></li>
            </ul>
		</div>
    </form>
</div>